<extend name="Base/common"/>
<block name="body">
	<div class="container">
		<div class="nav">
		    <img src="__IMG__/img_1.png" alt="" id="show">			
			<h3>交易历史</h3>
		</div>
		<div class="transactiontop">
			总盈亏:<span style="color: #dd514c;">0.00元</span>
		</div>
		<div class="transctionright clearfix">
			<div class="transctionto">总单数</div>
			<div class="transctionto">总手数</div>
		</div>
		<div class="transctionright clearfix">
			<div class="transctionto">2</div>
			<div class="transctionto">2</div>
		</div>
		<ul class="transctionlist clearfix">
			<li class="clearfix">
			<span>2016-02-16</span>
			<span>金属之王迷你合约</span>
			<span>
				<span>1手</span>
				<span  class="gen">买涨</span>
			</span>
			<span class="red">0.0</span>
			</li>
		</ul>
	</div>
<script type="text/javascript">
var p="{$other.p}";//当前显示条数
//if(p=="") p=1;
 var stop=true;//触发开关，防止多次调用事件
 $(window).scroll(function() {  
      //当内容滚动到底部时加载新的内容 100当距离最底部100个像素时开始加载.
      if ($(this).scrollTop() + $(window).height() + 100 >= $(document).height() && $(this).scrollTop() > 100) {  
          
          if(stop==true){
              stop=false;
              p=p+1;//请求加载的条数  
              canshu="?t={$other.t}&p="+p+"&cid={$other.cid}";//拼连接
               //加载提示信息
               $(".transctionlist").append("<li class='ajaxtips'><div style='font-size:2em;text-align: center;'>Loding.....</div></li>");
               $.get("__URL__/nextpage"+canshu,function(data){
                   $(".ajaxtips").remove();
                   $(".transctionlist").append('<li class="clearfix"><span>'+data[0]+'</span><span>'+data[1]+'</span><span><span>'+data[2]+'</span><span  class="gen">'+data[3]+'</span></span><span class="red">'+data[4]+'</span></li>');
                   stop=true;
               })
         }
      }  
  }); 
</script>

</block>